package com.beiding.jsonanalyzer.analyze.query;

import com.beiding.jsonanalyzer.analyze.func.FuncBase;
import com.beiding.jsonanalyzer.analyze.func.FuncFactory;

/**
 * 子条件语法
 *
 * @author 丁常磊
 * @date 2022/6/27 13:57
 */

public class LastConnectOperator implements ConnectGrammar, FuncFactory<FuncBase<ComparatorResult>> {

    private NodeQueryBuilder nodeQueryBuilder;

    public LastConnectOperator(NodeQueryBuilder nodeQueryBuilder) {
        this.nodeQueryBuilder = nodeQueryBuilder;
    }


    @Override
    public NodeQueryBuilder getQueryBuilder() {
        return nodeQueryBuilder;
    }

    @Override
    public FuncBase<ComparatorResult> createInstance() {
        return getQueryBuilder().createInstance();
    }
}
